//
// Created by 86150 on 2021/11/16.
//

#ifndef UNNAMED1_CLIENT_APP_H
#define UNNAMED1_CLIENT_APP_H
#include "detecter.h"
#include "caller.h"
#include "ui_client.h"
#include <QApplication>
#include <QtCore/QVariant>
#include <QtWidgets/QApplication>
#include <QtWidgets/QLabel>
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QWidget>
#include <QTimer>
#include <QWidget>
#include <QImage>
#include <QTextBrowser>
#include <QtNetwork/QTcpSocket>
#include <QMessageBox>

QT_BEGIN_NAMESPACE

class client_app: public QWidget
{
	private:
		/*caller chater;
		caller poster;*/
		QTcpSocket chater;//socket file to chat
		QTcpSocket poster;//socket file to post scripts
		detecter AlexNet;
		Ui_RecycleNet ui;
		QTimer timer;
		cv::VideoCapture cap;//perpare
		cv::Mat frame;
		std::string outcome;
		std::string outcome4posting;
		cv::Mat buf;
		bool on;

		void open_camera();//for every button's function
		void shut_camera();
		void see();
		void detect();
		void post();
		void refresh_msg();
		void send_msg();
		void rgst();
		void out();

	public:
		client_app();
		void Show();

};


QT_END_NAMESPACE

#endif //UNNAMED1_CLIENT_APP_H
